﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue q = new Queue();

            q.Enqueue(001);
            q.Enqueue(002);
            q.Enqueue(003);

            foreach (var v in q)
            {
                Console.WriteLine(v);
            }

            //获取实例中包含的元素个数
            Console.WriteLine(q.Count);

            /*清除实例中的元素
            q.Clear();
            */

            //判断是否含有指定元素
            Console.WriteLine(q.Contains(004));

            //将实例中的元素复制到新数组
            object[] arr = q.ToArray();
            foreach(var v in q)
            {
                Console.WriteLine(v);
            }
        }
    }
}
